<div class="bg-light lter b-b wrapper-sm">
    <h1 class="m-n font-thin h4">询价单详情</h1>
</div>

<div class="wrapper-sm" ng-controller="inquiryRatifyCtrl">
    <div class="panel panel-default">

        <div class="panel-body">

            <form name="step1" class="form-validation form-horizontal">
                <div class="form-group">
                    <div class="panel-heading font-bold m-t-n m-b-sm">
                        基本信息
                    </div>
                    <label class="col-lg-1 pull-left control-label">总询价单编号:</label>
                    <label class="col-lg-2 control-label text-left">{{inquiryId}}</label>
                    <label class="col-lg-1 pull-left control-label">子询价单编号:</label>
                    <label class="col-lg-2 control-label text-left">{{InquiryChildId}}</label>
                    <label class="col-lg-1 pull-left control-label">下单时间：</label>
                    <label class="col-lg-2 control-label text-left">{{createTime}}</label>

                    <label class="w-s pull-left control-label">紧急程度<span class="text-danger">*</span></label>
                    <label class="col-lg-2 control-label text-left">{{urgency}}</label>

                </div>
                <div class="form-group">

                    <label class="col-lg-1 pull-left control-label">计划专员:</label>
                    <label class="col-lg-2 control-label text-left">{{plannerName}}</label>
                    <label class="w-s pull-left control-label">商务专员<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select class="form-control input-sm" ng-model="businessOfficerId" ng-options="x.id as x.realName for x in businessOfficerList" ng-disabled="payDisable" <option value="">请选择</option>
                        </select>
                    </div>
                    <label class="w-s pull-left control-label">客服专员<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select class="form-control input-sm" ng-model="customerServiceOfficerId" ng-options="x.id as x.realName for x in customerServiceOfficerList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>

                    <label class="w-s pull-left control-label">调度专员<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select class="form-control input-sm" ng-model="dispatchOfficerId" ng-options="x.id as x.realName for x in dispatchOfficerList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <button class="btn m-b-xs btn-sm btn-default btn-addon" ng-show="payHide"><i class="fa fa-refresh"></i>变换</button>
                </div>

                <div class="form-group">

                    <label class="col-lg-1 pull-left control-label">客户单位<span class="text-danger">*</span></label>
                    <label class="col-lg-2 control-label text-left">{{clientName}}</label>

                    <label class="w-s pull-left control-label">发货计划人<span class="text-danger">*</span></label>
                    <label class="col-lg-2 control-label text-left">{{consignorName}}</label>

                    <label class="w-s pull-left control-label">发货人电话<span class="text-danger">*</span></label>

                    <label class="col-lg-2 control-label text-left" ng-show="payHide">{{consignorPhone}}</label>
                </div>

                <div class="form-group">

                    <label class="col-lg-1">总询价内容</label>
                    <div class="col-lg-10">
                        <textarea class="form-control input-sm" ng-model="content" placeholder="请填写总询价内容" name="content" ng-disabled="payDisable"></textarea>
                    </div>

                </div>

                <div class="form-group">
                    <div class="panel-heading font-bold m-b-sm">
                        线路信息
                    </div>
                    <label class="col-lg-1 pull-left control-label">发货地址<span class="text-danger">*</span></label>
                    <div class="col-lg-4">
                        <ng-area city-list="startCityList" area-list="startAreaList" province="startProvince" city="startCity" area="startArea" ng-disabled="payDisable"></ng-area>

                    </div>
                    <div class="col-lg-3 m-l-n-lg">
                        <input type="text" class="form-control input-sm" id="startCity" ng-model="startAddress" placeholder="请填写详细地址" required name="startAddress" ng-disabled="payDisable">
                    </div>
                    <div class="line  pull-in"></div>
                    <label class="col-lg-1 pull-left control-label">送货地址<span class="text-danger">*</span></label>
                    <div class="col-lg-4">
                        <ng-area city-list="endCityList" area-list="endAreaList" province="endProvince" city="endCity" area="endArea" ng-disabled="payDisable"></ng-area>

                    </div>
                    <div class="col-lg-3 m-l-n-lg">
                        <input type="text" id="end_address" class="form-control input-sm" ng-model="endAddress" placeholder="请填写详细地址" required name="endAddress" ng-disabled="payDisable">
                    </div>

                </div>

                <div class="form-group">
                    <label class="col-lg-1 pull-left control-label">预计发货时间<span class="text-danger">*</span></label>
                    <div class="col-lg-3">
                        <div class="input-group input-group-sm date">
                            <input datetimepicker plugintype="datetime" id="planned_arrival_time" name="planned-arrival-time" ng-model="plannedArrivalTime" placeholder="预计发货时间" class="form-control" type="text" />
                            <span class="input-group-addon">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                        </div>
                    </div>

                    <label class="w-s pull-left control-label">预计到货时间<span class="text-danger">*</span></label>
                    <div class="col-lg-3">
                        <div class="input-group input-group-sm date">
                            <input datetimepicker plugintype="datetime" id="planned_delivery_time" name="planned-delivery-time" ng-model="plannedDeliveryTime" placeholder="预计到货时间" class="form-control" type="text" />
                            <span class="input-group-addon">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </span>
                        </div>
                    </div>
                    <label class="w-s pull-left control-label">里程数</label>
                    <div class="col-lg-2">
                        <input type="text" class="form-control input-sm" id="mileage" ng-model="mileage" placeholder="请填写里程数" required name="mileage" ng-pattern="/^[+]?\d+\.?\d*$/" ng-disabled="payDisable">
                    </div>
                    <label class="w-s pull-left control-label">公里</label>
                </div>

                <div class="form-group">
                    <div class="panel-heading font-bold m-b-sm">
                        货物信息
                    </div>

                    <label class="col-lg-1 pull-left control-label">货物类别<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select id="goodsTypeName" class="form-control input-sm" ng-model="goodsTypeId" ng-change="changeGoods()" ng-options="x.id as x.name for x in goodsTypeList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <label class="w-s pull-left control-label">货物名称<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select class="form-control input-sm" id="goodsName" ng-model="goodsId" ng-options="x.id as x.name for x in goodList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>

                    <label class="w-s pull-left control-label">货物数量<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <input type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" id="goods_quantity" class="form-control input-sm" ng-model="goodsQuantity" placeholder="请填写货物数量" required name="goodsQuantity" ng-disabled="payDisable">
                    </div>
                    <div class="col-lg-2 m-l-n-sm">
                        <select class="form-control input-sm" id="goodsQuantityUnit" ng-model="goodsQuantityUnit" ng-options="x.value as x.text for x in goodsQuantityUnitList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <div class="panel-heading font-bold m-b-sm">
                        所需车辆信息
                    </div>

                    <label class="col-lg-1 pull-left control-label">所需车型<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select id="carType" class="form-control input-sm" ng-model="carType" ng-options="x.value as x.text for x in carTypeList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <label class="w-s pull-left control-label">所需车长<span class="text-danger">*</span></label>
                    <div class="col-lg-2">
                        <select id="carLength" class="form-control input-sm" ng-model="carLength" ng-options="x.value as x.text for x in carLengthList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>

                    <label class="w-s pull-left control-label">承运方式<span class="text-danger">*</span></label>

                    <div class="col-lg-2">
                        <select class="form-control input-sm" ng-model="carrierCategory" ng-options="x.value as x.text for x in carrierCategoryList" ng-disabled="payDisable">
                            <option value="">请选择</option>
                        </select>
                    </div>
                    <label class="w-s pull-left control-label">装车效果</label>
                    <div class="col-lg-2">
                        <input type="text" id="loadding_effect" class="form-control input-sm" ng-model="loadingEffect" placeholder="请填写装车效果" required name="loadingEffect" ng-disabled="payDisable">
                    </div>

                </div>
                <div class="form-group">
                    <div class="panel-heading font-bold m-b-sm">
                        附件信息
                    </div>

                    <div class="col-md-4 m-l-xs">
                        <label class="pull-left m-l m-r">附件上传</label>
                        <div class="col-md-3 form-group">
                            <input type="file" style="width:72px;" file-read name="driver-uploader" uploader="driverUploader" ng-disabled="driverUploader.queue.length" multiple/>
                        </div>
                    </div>
                    <div class="wrapper-sm">
                        <div class="line  pull-in"></div>
                        <div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
                            <span class="">上传文件数: <b class="badge bg-info">{{ driverUploader.queue.length }}</b></span>
                        </div>
                        <table class="table bg-white-only b-a">
                            <thead>
                                <tr>
                                    <th width="50%">名称</th>
                                    <th >大小</th>
                                    <th >进度</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="item in driverUploader.queue">
                                    <td>
                                        <strong>{{ item.fileName }}</strong>
                                    </td>
                                    <td  nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
                                    <td >
                                        <div class="progress" style="margin-bottom: 0;">
                                            <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                        </div>
                                    </td>
                                    <td class="text-center">
                                        <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                        <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                        <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                    </td>
                                    <td nowrap>
                                        <button type="button" class="btn btn-success btn-xs" ng-click="driverUploader.upload(item)" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                                            <span class="glyphicon glyphicon-upload"></span> 上传
                                        </button>
                                        <button type="button" class="btn btn-warning btn-xs" ng-click="driverUploader.downloads(item)">
                                            <span class="fa fa-cloud-download"></span> 下载
                                        </button>
                                        <button type="button" class="btn btn-danger btn-xs" ng-click="[driverUploader.Delete(item)]">
                                            <span class="glyphicon glyphicon-trash"></span> 删除
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <button type="button" class="btn btn-sm btn-addon btn-success" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">
                            <i class="fa fa-arrow-circle-o-up"></i> 全部上传
                        </button>
                    </div>
                </div>
                <div class="form-group">
                    <label class="m-l-xxl pull-left control-label">备注</label>
                    <div class="col-lg-10">
                        <textarea class="form-control input-sm" ng-model="attachmentDetails" placeholder="请填写备注" name="attachmentDetails" ng-disabled="payDisable"></textarea>
                    </div>
                </div>
                <div class="form-group" ng-show="inquiryChildShow">
                    <div class="panel-heading font-bold m-b-sm">
                        子询价单列表
                    </div>
                    <div class="form-group m-b-n">
                        <div class="pull-right m-r-xl">
                            <button class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="inquiryChildListAdd()"><i class="fa fa-plus"></i>新增</button>
                        </div>
                    </div>
                    <div class="wrapper-sm">
                        <div class="table-responsive">
                            <div ui-grid="inquiryList" ui-grid-pagination style="height:{{height}}px; overflow-x:hidden;">
                                <div class="watermark" ng-if="!inquiryList.data.length">暂无数据</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="panel-heading font-bold m-b-sm">
                        应付报价信息
                    </div>
                    <div class="col-lg-10 form-group">
                        <label class="col-lg-1 pull-left control-label">应付单价<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="payableQuotation" ng-model="payableQuotation" placeholder="请填写应付单价" required name="payableQuotation" ng-disabled="payDisable">
                        </div>
                        <div class="col-lg-2 m-l-n-sm">
                            <select class="form-control input-sm" id="payableQuotationUnit" ng-model="payableQuotationUnit" ng-options="x.value as x.text for x in payableQuotationUnitList" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="col-lg-1 pull-left control-label">应付说明（外付）<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="payableQuotationDetails" ng-model="payableQuotationDetails" placeholder="请填写应付说明（外付）" required name="payableQuotationDetails" ng-disabled="payDisable">
                        </div>
                    </div>
                    <div class="col-lg-10 form-group">
                        <label class="col-lg-1 pull-left control-label">应付单价2</label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control" id="payableQuotationTow" ng-model="payableQuotationTow" placeholder="请填写应付单价2" required name="payableQuotationTow" ng-disabled="payDisable">
                        </div>
                        <div class="col-lg-2 m-l-n-sm">
                            <select class="form-control input-sm" id="payableQuotationUnitTow" ng-model="payableQuotationUnitTow" ng-options="x.value as x.text for x in payableQuotationUnitList" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="col-lg-1 pull-left control-label">应付说明（外付）2</label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="payableQuotationDetailsTow" ng-model="payableQuotationDetailsTow" placeholder="请填写应付说明（外付）2" required name="payableQuotationDetailsTow" ng-disabled="payDisable">
                        </div>
                    </div>
                    <div class="col-lg-10 form-group">
                        <label class="col-lg-1 pull-left control-label">应付单价3</label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="payableQuotationThree" ng-model="payableQuotationThree" placeholder="请填写应付单价3" required name="payableQuotationThree" ng-disabled="payDisable">
                        </div>
                        <div class="col-lg-2 m-l-n-sm">
                            <select class="form-control input-sm" id="payableQuotationUnitThree" ng-model="payableQuotationUnitThree" ng-options="x.value as x.text for x in payableQuotationUnitList" ng-disabled="payDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="col-lg-1 pull-left control-label">应付说明（外付）3</label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="payableQuotationDetailsThree" ng-model="payableQuotationDetailsThree" placeholder="请填写应付说明（外付）3" required name="payableQuotationDetailsThree" ng-disabled="payDisable">
                        </div>
                    </div>
                </div>
                <div class="form-group" ng-show="payHide">
                    <div class="panel-heading font-bold m-b-sm">
                        应收报价信息
                    </div>
                    <div class="col-lg-10 form-group">
                        <label class="col-lg-1 pull-left control-label">应收单价<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="receivableQuotation" ng-model="receivableQuotation" placeholder="请填写应收单价" required name="receivableQuotation" ng-disabled="receiveDisable">
                        </div>
                        <div class="col-lg-2 m-l-n-sm">
                            <select class="form-control input-sm" id="receivableQuotationUnit" ng-model="receivableQuotationUnit" ng-options="x.value as x.text for x in payableQuotationUnitList" ng-disabled="receiveDisable">
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <label class="col-lg-1 pull-left control-label">应收说明（厂付）<span class="text-danger">*</span></label>
                        <div class="col-lg-2">
                            <input type="text" class="form-control input-sm" id="receivableQuotationDetails" ng-model="receivableQuotationDetails" placeholder="请填写应收说明（厂付）" required name="receivableQuotationDetails" ng-disabled="receiveDisable">
                        </div>
                    </div>
                </div>
                <div class="form-group" ng-show="remrksShow">
                    <div class="panel-heading font-bold m-b-sm">
                        备注信息
                    </div>
                    <label class="col-lg-1 pull-left control-label">备注</label>
                    <div class="col-lg-10">
                        <textarea class="form-control input-sm" ng-model="remarks" placeholder="请填写备注" name="remarks"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-1 pull-left control-label"></label>
                    <div class="col-lg-5">
                        <button ui-sref="app.inquiry.Inquiry_manage" class="pull-right-xs btn m-b-xs btn-sm btn-info btn-addon"><i class="fa fa-mail-reply"></i>返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>